package com.learn.demo.netty.rpc.provider;

import com.learn.demo.netty.rpc.publicserver.HelloService;
import lombok.extern.slf4j.Slf4j;

import java.util.Objects;

/**
 * 生产者实现类
 *
 * @author banjiawei
 * @date 2022/03/11
 */
@Slf4j
public class HelloServiceImpl implements HelloService {
    @Override
    public String sayHello(String msg) {
        log.info("收到客户端消息：{}", msg);
        if(Objects.isNull(msg)){
            return "你好客户端，已经收到你的消息";
        }
        return String.format("你好客户端，已经收到你的消息：【%s】", msg);
    }
}
